package com.bmft;

        import androidx.appcompat.app.AppCompatActivity;

        import android.app.ProgressDialog;
        import android.content.Intent;
        import android.os.Bundle;
        import android.view.View;

public class ProgressDialogActivity15 extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_progress_dialog15);
    }

    public void backToMain(View view) {
        Intent intent = new Intent(ProgressDialogActivity15.this, MainActivity.class);
        startActivity(intent);
    }

    public void showProgressDialog(View view) {
        ProgressDialog progressDialog = new ProgressDialog
                (ProgressDialogActivity15.this);
        progressDialog.setTitle("This is ProgressDialog");
        progressDialog.setMessage("Loading...");
        progressDialog.setCancelable(true);
        progressDialog.show();
    }

    public void backToMain2(View view) {
        Intent intent = new Intent(ProgressDialogActivity15.this, MainActivity2.class);
        startActivity(intent);
    }
}